home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 53
/
Tiger_Disk_053_1998-08_Tiger-Crew-Disk_de_Side_B.d64
/
1581 copy sb
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
4KB
|
111 lines
0 close15:open15,8,15,"u9":close15
14 print"[147]"
15 poke 53281,0:poke53280,0:poke56,40:clr:tx$="a":fora=1to40:tx$=tx$+"a":next
20 print"[154] "
22 print"[145] copier 1581 "
24 print"[145][154] "
25 print"[155]a multi file copier to copy files from the 1541 to 1581";
26 print"[150] ******** [156]s.a.brethour"
29 gosub1000:gosub2100
30 op=51:dim f$(op),t$(op),p(op),b%(op):gosub1200:gosub1100:bf=168:a1=1
65 poke3,0:poke4,peek(56):ifv=0then990
70 print"[147]":gosub5000:print"[150]reading[153]":fora=1tov:iff$(a)=""then100
75 f$(a)=f$(a)+","+t$(a)+",":bf=bf-b%(a):ifbf<1thengosub1300
79 printleft$(f$(a),len(f$(a))-3)
80 open15,d,15:open2,d,2,f$(a)+"r"
82 input#15,er,er$:iferthenprinttab(20)"[145]"er$:goto87
84 sys866
87 close2:close15:p(a)=peek(3)+peek(4)*256:p1=p(a)+1
90 h=int(p1/256):l=p1-(h*256):poke3,l:poke4,h:ifbf-b%(a+1)<1thengosub1300
100 next a:ifpeek(4)=peek(56)andpeek(3)=0then990
110 f=-99:gosub1300
990 print"any more files? (y/n) ";
991 geta$:ifa$<>"y"anda$<>"n"then991
992 ifa$="y"then14
999 clr:end
1000 fori=828to898:readx:pokei,x:nexti:return
1020 data162,2,32,201,255,198,1,160,0,56,165,3
1030 data229,5,165,4,229,6,176,13,177,3,32,210
1040 data255,230,3,208,236,230,4,208,232,230,1,76
1050 data204,255,162,2,32,198,255,160,0,32,207,255
1060 data145,3,230,3,208,2,230,4,36,144,80,241
1070 data165,3,133,5,165,4,133,6,76,204,255
1100 u=1:print:print:ay=0:q$="y"
1108 print"[159][147]":gosub5000
1110 open8,d,0,"$0:"+pm$
1120 get#8,a$,a$,a$,a$,a$,a$:sys899:printleft$(tx$,peek(142))
1125 get#8,a$,a$,a$,b$
1130 c=asc(a$+chr$(0))+asc(b$+chr$(0))*256
1135 if peek(144)<>0 then1190
1140 print c;
1145 sys899:ss=peek(144):printleft$(tx$,peek(142)):ifleft$(tx$,3)="blo"then1190
1150 print"[145]";tab(30);"[153](y/n) ";
1155 a$=left$(tx$,peek(142))
1160 ifay<>-99thengett$:ift$<>" "andt$<>"y"andt$<>"n"andt$<>chr$(13)then1160
1165 ift$=chr$(13)thenprintq$:goto1170
1166 print"[150]";:printt$;:print"[158]"
1170 ift$=chr$(32)then1195
1171 ift$=chr$(13)thenay=-99:t$=q$
1175 ift$="n"thenq$=t$:goto1185
1180 ift$="y"thenq$=t$:gosub2200:u=u+1
1183 ifu>op-1thenclose8:print"only";op-1;"files allowed at once":close8:goto1195
1185 goto1125
1190 print"[145]blocks free":close8
1195 v=u-1:forx=1to1500:next:return
1200 input "[158]copy from drive 8[157][157][157]";d
1210 ifd<8ord>11then1200
1220 input "[159]copy to drive 8[157][157][157]";d1
1230 ifd1<8ord1>11then1220
1250 input "[154]pattern match: *[157][157][157]";pm$
1260 ifpm$=""orlen(pm$)>16then1250
1270 print"[155]format target (y/n)? ";
1275 geta$:ifa$="n"ora$=chr$(13)thenprint"n":return
1280 ifa$<>"y"then1275
1281 print"[147]":gosub 5000
1282 input"[156]name (16 chars max)";a$:ifa$=""thenreturn
1285 b$="":input"id (2 chars)";b$:ifb$<>""thena$=a$+","+b$
1287 ifd=d1thenprint"[129]insert blank disk":poke198,0:wait198,1:poke198,0
1288 print"[158]formatting...."
1290 open15,d1,15,"n0:"+a$:input#15,er,er$:iferthenprint""er$:end:run
1291 print"format another? (y/n) ";
1292 geta$:ifa$<>"y"anda$<>"n"anda$<>chr$(13)then1292
1293 ifa$=chr$(13)thena$="n"
1294 printa$:ifa$="y"thenclose15:a$="":goto1282
1295 close15:ifd=d1thenprint"[150]insert source":poke198,0:wait198,1:poke198,0
1296 return
1300 ifd=d1thenprint"[158]please swap":poke198,0:wait198,1:poke198,0
1301 poke3,0:poke4,peek(56):print"[154]writing":forb=a1toa:iff$(b)=""then1340
1302 printleft$(f$(b),len(f$(b))-3)
1305 p=p(b):h=int(p/256):l=p-(h*256):poke5,l:poke6,h
1320 open15,d1,15:open2,d1,2,f$(b)+"w"
1322 input#15,er,er$:iferthenprinttab(20)"[145]"er$:goto1327
1324 sys828
1327 close2:close15
1330 p=p(b)+1:h=int(p/256):l=p-(h*256):poke3,l:poke4,h
1340 nextb:a$="":print"write files to another disk?[146] (y/n)? ";:gosub2300
1341 ifa$="y"then1300
1342 poke3,0:poke4,peek(56)
1343 iff=-99then990
1345 ifd=d1thenprint"[150]please swap":poke198,0:wait198,1:poke198,0
1347 print"[129]reading"
1350 bf=168:a1=a+1:return
1999 rem string thing
2000 data 160,2,177,45,153,137,0,200,192,6
2010 data 208,246,162,8,32,198,255
2020 data 32,228,255,201,13,240,15,164,142,145
2030 data 140,200,132,142,196,139,240,4,165,144,240,234,76,204,255
2040 data 144,240,238,76,204,255
2100 fori=899to940:readx:pokei,x:next:poke920,0:return
2200 b%(u)=c:a$=left$(tx$,peek(142))
2210 f$(u)=mid$(str$(c)+a$,7,16)
2220 fora=1to16:ifmid$(f$(u),a,1)=chr$(34)thenf$(u)=left$(f$(u),a-1):a=17
2230 next:t$(u)=mid$(str$(c)+a$,25,1):return
2300 geta$:ifa$<>"y"anda$<>"n"anda$<>chr$(13)then2300
2310 ifa$=chr$(13)thena$="n"
2320 printa$:return
5000 print"[154] "
5002 print"[145] copier 1581 "
5004 print"[145][154] "
5005 print"[158]"
5006 return